﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewTask.aspx.cs" Inherits="Task.NewTask" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="css/style.css" rel="stylesheet" rev="stylesheet" />
    <link href="css/global.css" rel="stylesheet" rev="stylesheet" />
    <link href="css/UI_Css/jquery-ui-1.8.17.custom.css" rel="stylesheet" rev="stylesheet" />
    <script src="script/jquery-1.7.1.min.js" />
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div class="listTable_1">
            <div class="tableTab" id="tabs">
                <div class="place">
                    <div class="placeleft">
                        <ul>
                            <li class="currently" id="li0"><a href="#" onclick="ShowServicesProcess('s')">按服务项目</a></li>
                            <li id="li1"><a href="#" onclick="ShowServicesProcess('p')">按流程名称</a></li>
                        </ul>
                    </div>
                </div>
                <div id="Services">
                    <div style="background-image: url('images/line.png'); background-repeat: repeat-y;
                        height: 300px; left: 40%; position: absolute; width: 3px; margin-top: 20px">
                    </div>
                    <div id="ServicesLeft" style="width: 40%; float: left; margin-top: 10px">
                        <table border="0" cellpadding="0" cellspacing="0" class="listTable1">
                            <tr>
                                <td style="width: 60%; text-align: center">
                                    <asp:TextBox ID="txtSearch" runat="server" CssClass="inputBorder" Width="80%"></asp:TextBox>
                                </td>
                                <td style="text-align: center">
                                    <asp:Button ID="btnSearch" runat="server" Text="查询" CssClass="btnBg" />
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div id="ServicesRight" style="width: 50%; margin-top: 10px">
                        <span style="font-weight: bolder; margin-left: 30px">最近使用的服务项目</span>
                    </div>
                </div>
                <%--按流程发起--%>
                <div id="ProcessName" style="display: none">
                    <div class="listTable_1">
                        <div class="tableTab" id="processCatalogTab">
                            <asp:HiddenField runat="server" ID="hdProcessTypeId" Value="0" />
                            <ul>
                                <%--<li class='' id='processCatalog'><a href="#" onclick="">流程名称</a></li>--%>
                                <%=ContentProcessType %>
                            </ul>
                            <div style='display: none' id='processCatalog1'>
                                <br />
                                <div id="ptypeId">
                                </div>
                                <div id="taskNmaeid">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    </form>
    <script type="text/javascript">
        function SetProcessType(dicId) {
            this.getAllTask(dicId);
            if (dicId != 0) {
                document.getElementById("ptypeId").innerHTML = document.getElementById("pc" + dicId).innerHTML + "<div style='background: url(images/line2.png) 0 11px repeat-x; width: 900px; display: block; height: 15px;'></div>";
            } else {
                document.getElementById("ptypeId").innerHTML = "";
            }
        }
        function ShowServicesProcess(flg) {
            var pn = document.getElementById("ProcessName");
            var ss = document.getElementById("Services");
            if (pn.style.display == "none") {
                pn.style.display = "";
                ss.style.display = "none";
            } else {
                ss.style.display = "";
                pn.style.display = "none";
            }
        }

        function getAllTask(PdId) {
            document.getElementById("processCatalog1").style.display = "";
            $.ajax({
                url: 'AjaxPage/getAllTask.aspx?PdId=' + PdId + '&timestamp=' + new Date().getTime(),
                type: 'GET',
                dataType: 'html',
                timeout: 90000,
                error: function (html) {
                    alert('Error loading XML document' + html);
                },
                success: function (html) {
                    document.getElementById("taskNmaeid").innerHTML = html;
                }
            });
        }
        
    </script>
</body>
</html>
